·Edit 1.1 Written by Leonard Rosenthol Copyright ©1987 by Halevai Software Introduction and History ---------------------- As a programmer and avid telecommunicator, the DA that I used most of all was a text editing DA. I chose the editor that I did because of its very nice interface and many useful features, however it was far from being the ultimate DA text editor. So I waited and waited, hoping that something new and wonderful would come along that would answer all of my wishes. Well, nothing came along that answered all of my wishes. I'd find one that handled tabs properly, but it wouldn't allow me to set the Font/Size I wanted to view the text in, or maybe I'd find one that allowed unlimited length files, but didn't support Find/Replace. Then recently I was hired as a contract programmer to do some work for a professor here on campus in converting an IBM program onto the Macintosh. The only problem was that the program was in C, and I hadn't worked with C for a few years and was not a big fan of using C on the Macintosh. Well, I said, he's paying me well, so I guess I better relearn my C. ·Edit is the product of my adventures of relearning C, and using it on the Macintosh. The first version of ·Edit was put together in the period of about a week (during which I got little sleep) using LightSpeed C, and Think's (or is it Symantec's) CAPPS' package. Therefore portions of this DA are copyright ©1987 Think Technologies. I have tried to put into it every feature that I wanted in my ultimate text editing DA, and that other people have asked for. If I forgot something that you would like to see in the next version of ·Edit, please drop me a note either electronically or by USnail. Leonard Rosenthol GEnie: MACgician 205 E. Healey #33 Bitnet: 3FLOSDQ@UIUCNOSA Champaign, Il 61820 Tele #: (217) 352-7435 Basic Features List ------------------ ¥ File I/O (New, Open, Save, Save As, Revert) ¥ Printing to ANY printer NOT limited to just the ImageWriter and LaserWriter ¥ Complete Cut/Copy/Paste support TEXT ONLY! ¥ Ability to set the Font and Size to display the text in ¥ A movable, resizable and zoomable window ¥ Support for the arrow keys on the Mac+ and MacSE/Mac ][ keyboards for cursor movement Additional Features ------------------ ¥ Support for unlimited length files Limited only by memory!! ¥ True Tabs with a user-definable setting ¥ Complete UNDO support for all functions that modify the text ¥ Very fast Search and Replace routines incl: Replace Replace All Enter Selection into Find Dialog (Command-E) ¥ AutoIndenting ¥ Ability to immediately jump to: Beginning of current line (Option-LeftArrow) End of current line (Option-RightArrow) Beginning of document (Command-, or Command-< or Option-UpArrow) End of document (Command-. or Command-> or Option-DownArrow) Any line by number (Command-/ or Command-?) ¥ Ability to shift paragraphs Left by tab stops (Command-[ or Command-{) Right by tab stops (Command-] or Command-}) ¥ Triple clicking on a line will select that whole line ¥ Command or Shift-ArrowKeys can be used to extend/shrink the selection range Extend one character to right Command/Shift-RightArrow Extend one character to left Command/Shift-LeftArrow Extend one line down Command/Shift-DownArrow Extend one line up Command/Shift-UpArrow (Added in 1.1) ¥ Information about your document can be obtained by doing a Command-I (for Information). This will give you a character, word and line count. The character count and line count are exact, the word count is obtained by dividing the character count by 5 (the average word size according to my high school typing teacher). The reason that this is done is that I do not want to waste the users time calculating the word count, so I approximate. The other values are stored as part of the edit record, so they are readily available. ¥ Command or Shift-Arrow keys now work exactly as described in Inside Macintosh IV (pgs. 3 - 6). This is a change from the way they work in 1.0. You now have the ability to choose whether you want to use the Command or Shift key to signify selection!! (See Power User features for more information about this feature!) ¥ Command-Option or Shift-Option-Arrows work exactly as described in Inside Macintosh IV (pgs. 3 - 6). Extend Selection to beginning of line Command/Shift-Option-LeftArrow Extend Selection to end of line Command/Shift-Option-RightArrow Extend Selection to beginning of document Command/Shift-Option-UpArrow Extend Selection to end of document Command/Shift-Option-DownArrow ¥ You can now enter any ASCII character by doing a Command-` or Command-~. This will bring up a dialog with a list of all of the ASCII characters, in order, along with their hexadecimal and decimal values. Just select the character you want from the list, and it will be entered into the text at the current selection point. Just in case you don't happen to catch this, the list is displayed in the current font and current size, and this may cause some problems (see Known Bugs below). ¥ Printing can be cancelled at any time by doing a Command-. The dialog that is displayed during printing informs you of this, but I thought I'd add it in here. All this comes in a DA that is ONLY 38K large!! and can be had for the small price of $0.00! I am not asking any money for this DA, since I did not intend to sell it when I first staring writing it. All that I ask is that you enjoy using ·Edit, that you pass it on to as many people as you can, and that if you have a couple of bucks to spare that you might consider sending them to me. ·Edit may not be distributed with a product that is being sold for profit, however if you wish to do so, please contact me and we can arrange something. PowerUser Feature Notes ------------------------ ¥ All of the default settings for ·Edit are stored in the DA's resource file under type DDAT. There is a TMPL resource in the DA as well. If you copy this TMPL into your copy of ResEdit, you will find editing the default resource infinitly easier. ¥ When doing a Find or Find/Replace you can enter some non-typeable keys into the Find/Replace dialog by using the CommandKey in conjuction with the key. In the present version, the following key are supported: Tab Command-Tab Carriage Return (CR) Command-Return NewLine/LineFeed (LF) Command-Enter ¥ If you wish to search for a particular piece of text very quickly. Select the text, do a Command-E (which enters the selection as the search text), and then do a Command-G (Find Again). The next occurance of the previously selected text, will now be selected. (Added in 1.1) ¥ Some of you may have discovered this, but it really is undocumented. If you do a Command-Q, it will have the same effect as clicking in the close box (ie. Command-Q = Quit) ¥ If you are writing code, for example, and you have finished an indented section, and now wish to go back a tab space, you previously had to type return and then hit backspace, you can now do an Option-Return to have this done automatically. You can also temporarily overide autoindenting (ie. bring the cursor back to the beginning of the next line) by doing a Shift-Option Return. ¥ Another user definable option has been added to the DDAT resource. You can now set a Boolean value that lets ·Edit know whether you want to start up with an empty document, or with the standard file dialog (SFGetFile). ¥ Another new option in the DDAT allows you to tell ·Edit whether you wish to use Command-Arrows or Shift-Arrows for selecting text. This was added to satisfy both parties in the previous debate. There is, however, a problem. Mac Plus owners (or those using a Mac Plus keyboard), CAN NOT use the Shift-Arrow keys (even if the bit is set), just yet. I will have this fixed in version 1.2, or in an intermediate version. ¥ The other option that was added into the DDAT is a field that allows you to tell ·Edit what creator type you want any files saved by ·Edit to use. This way you can have ·Edit create text files which can later be opened with MacWrite, or QUED, etc. just by double clicking. ¥ You can now enter replacement text, using Command-W (or Command-w), in addition to being able to enter the search text. This was added as a solution to the existing bug concerning pasting into the Find/Replace Dialog. ¥ I remembered to include the TMPL in the DA so that you can make these changes!! Known Bugs or Problems ---------------------- I must admit that I have not throughly tested this DA in all possible combinations of hardware and software, but there is no reason why it should not work in just about any setting. If you do find a situation where ·Edit does not work, please let me know so I can correct it. Although not a bug, the text WILL NOT WRAP when you reach the right side of the window. You must either explicity enter a return (which I did for this document) or have your text go beyond the window. This is result of the CAPPS' package, not my coding. But I will see if anything can be done about this for the next version. (Fixed in 1.1) The About box bug reported in version 1.0 has been fixed and you can now choose About ·Edit till the cows come home without your machine doing funny things to you. A bug that no one else found, but that did exist, is that if you happend to have document that was created in a size that ·Edit's Typestyle DLOG did not recognize, then you would end up in bombville. I have corrected this problem by changing any non-standard font size to 9pt during the OpenFile process. I know that this is a bad idea, but until I have some time to redo the Typestyle dialog, this is it! I have fixed a bug in the printing routines which would cause it to bomb on a Mac ][, but not, for some interesting reason, on any other type of Mac. Anyway, the bug has been fixed and (as listed above) you can do a Command-. to cancel printing. The Enter Ascii function is only preliminary and has some known quirks to it. I am working on improving it for version 1.2. Right now I am planning on adding the ability to autoselect by keystroke (i.e. you hit a key and it becomes selected in the list) and finding a better way of drawing the list (LDEF time). If you any other suggestions for improvements, please let me know. You can not (for some unknown reason) paste the text on the clipboard into the Find/Replace Dialog. You can cut/copy/paste within the dialog, but there is no data exchange with the clipboard. The present solution to this is to use the Command-E and Command-W functions to set the Find/Replace text. There was a bug in the Replace All command that would cause it to go VERY SLOWLY by scrolling each occurance into view before making the change. If you tell it that you do not want to verify (clicking the NO button in the verify dialog), then it will make all of the changes quietly and will leave you at the end of the document when it has completed its job. As noted above in the Power User Features, users with the Mac Plus keyboard (I have one too, so believe me that I am working on it) can not use Shift-Arrow keys, even if the Shift-Arrow bit is set. Possible Additions in 1.2 ---------------------- ¥ The next version may allow the user to set the default text settings from within the DA, rather than having to rely on ResEdit. This may facilitate the presence of an additional settings file that will be in your System Folder. I would like to hear comments on whether have the additional file would be preferable to using ResEdit to modify the defaults. (Right now the consensus seems to be that most people don't mind using ResEdit to modify the settings and they also don't want anything else in their system folder. Therefore, unless I hear otherwise from users, this feature may never see the light of day!!) ¥ A Tabs to Spaces and a Spaces to Tabs command. ¥ Case Conversion (All Upper, All Lower, Capitalize, Change Case) ¥ Show Invisibles ¥ Turbo Scrolling Possible Additions by 2.0 ----------------------- ¥ The ability to have a line automatically wrapped at a certain length. ¥ Multiple windows so that you can view and edit more than one file simultaneously. ¥ I'm not promising anything, but I might try to read in MacWrite and/or Word files without formatting ¥ Open any file as a text file ¥ Grep or True Regular Expression search/replace ¥ Anything else you think would be useful in a TextEditing DA!! I am very open to suggestions and comments on ·Edit. If you have comments, questions, problems, suggestions, flames, or whatever please feel free to contact me using ANY of the above methods. I hope that you enjoy ·Edit as much as I enjoyed writing it and relearning C. Leonard Rosenthol Halevai Software